//
//  OrderCashBack.swift
//  FeastBooking
//
//  Created by Imon on 2017/11/16.
//  Copyright © 2017年 Imon. All rights reserved.
//

import Foundation
import ObjectMapper

class OrderCashBack: Response {
    
    var amountPaid: Double?
    var cashBackStrategy: CashBackStrategy?
    var orderId: Int?
    
    required init?(map: Map) {
        super.init(map: map)
    }
    
    override func mapping(map: Map) {
        super.mapping(map: map)
        amountPaid <- map["amountPaid"]
        cashBackStrategy <- map["cashbackStrategy"]
        orderId <- map["orderId"]
    }
}

class CashBackStrategy: Mappable {
    
    var percentageForCustomer: Double?
    var percentageForManager: Double?
    var percentageForRecommender: Double?
    
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        percentageForCustomer <- map["percentageForCustomer"]
        percentageForManager <- map["percentageForManager"]
        percentageForRecommender <- map["percentageForRecommender"]
    }
}
